
   package com.pegasusexport.www.Codegen
   {
      import weborb.data.*;
      import com.pegasusexport.www.*;
      import mx.collections.ArrayCollection;
      import flash.utils.ByteArray;

      [Bindable]
      public dynamic class _Product extends ActiveRecord
      {

        public function get ActiveRecordUID():String
        {
          return _activeRecordId;
        }

        public function set ActiveRecordUID(value:String):void
        {
          _activeRecordId = value;
        }

         private var _uri:String = null;

         protected var _id:int;
         protected var _pic:String;
         protected var _cata:int;
         protected var _man:String;
         protected var _cd:String;
         protected var _faq:String;
         protected var _cp:String;
         protected var _sw:String;
         protected var _wp:String;
         protected var _cs:String;
         protected var _utime:Date;

         public function get Id():int
         {
           return _id;
         }

         public function set Id(value:int):void
         {
            _isPrimaryKeyAffected = true;
            _uri = null;

            if(IsLoaded || IsLoading)
            {
              trace("Critical error: attempt to modify primary key in initialized object " + getURI());
              return;
            }
            _id = value;
         }

         public function get Pic():String
         {
           return _pic;
         }

         public function set Pic(value:String):void
         {
            _pic = value;
         }

         public function get Cata():int
         {
           return _cata;
         }

         public function set Cata(value:int):void
         {
            _cata = value;
         }

         public function get Man():String
         {
           return _man;
         }

         public function set Man(value:String):void
         {
            _man = value;
         }

         public function get Cd():String
         {
           return _cd;
         }

         public function set Cd(value:String):void
         {
            _cd = value;
         }

         public function get Faq():String
         {
           return _faq;
         }

         public function set Faq(value:String):void
         {
            _faq = value;
         }

         public function get Cp():String
         {
           return _cp;
         }

         public function set Cp(value:String):void
         {
            _cp = value;
         }

         public function get Sw():String
         {
           return _sw;
         }

         public function set Sw(value:String):void
         {
            _sw = value;
         }

         public function get Wp():String
         {
           return _wp;
         }

         public function set Wp(value:String):void
         {
            _wp = value;
         }

         public function get Cs():String
         {
           return _cs;
         }

         public function set Cs(value:String):void
         {
            _cs = value;
         }

         public function get Utime():Date
         {
           return _utime;
         }

         public function set Utime(value:Date):void
         {
            _utime = value;
         }


        protected override function onDirtyChanged():void
        {
        }

        public override function extractRelevant(cascade:Boolean = false):Object
        {
          var object:Product = new Product();

              object.Id = this.Id;
              object.Pic = this.Pic;
              object.Cata = this.Cata;
              object.Man = this.Man;
              object.Cd = this.Cd;
              object.Faq = this.Faq;
              object.Cp = this.Cp;
              object.Sw = this.Sw;
              object.Wp = this.Wp;
              object.Cs = this.Cs;
              object.Utime = this.Utime;
         object.ActiveRecordUID = this.ActiveRecordUID;
         
         return object;
       }

          public override function applyFields(object:Object):void
          {
             if(!IsPrimaryKeyInitialized)
               Id = object["Id"];

             Pic = object["Pic"];
             Cata = object["Cata"];
             Man = object["Man"];
             Cd = object["Cd"];
             Faq = object["Faq"];
             Cp = object["Cp"];
             Sw = object["Sw"];
             Wp = object["Wp"];
             Cs = object["Cs"];
             Utime = object["Utime"];

             _uri = null;
             _isPrimaryKeyAffected = true;
             IsDirty = false;
          }

        protected override function get dataMapper():DataMapper
        {
          return DataMapperRegistry.Instance.Product;
        }
        
        public override function getURI():String
        {

          if(_uri == null)
          {
             _uri = "pegasusexport.product" + "." + Id.toString();
          }
           
          return _uri;
        }

      }
   }